package com.mm.cloud.sys.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 路由
 * </p>
 *
 * @author mr
 * @since 2020-09-15
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "路由")
public class RouterVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "路由名字")
    private String name;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "是否隐藏路由，当设置 true 的时候该路由不会再侧边栏出现")
    private boolean hidden;

    @Schema(description = "重定向地址，当设置 noRedirect 的时候该路由在面包屑导航中不可被点击")
    private String redirect;

    @Schema(description = "组件地址")
    private String component;

    @Schema(description = "当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面")
    private Boolean alwaysShow;

    @Schema(description = "其他元素")
    private MetaVO meta;

    @Schema(description = "子路由")
    private List<RouterVO> children;

}
